package com.coffee.admin.api.supplier.service;

import com.coffee.admin.api.platform.rep.PlatformOperateRes;
import com.coffee.admin.api.platform.req.PlatformAccountAddReq;
import com.coffee.admin.api.platform.req.PlatformAccountListReq;
import com.coffee.admin.api.platform.req.PlatformAccountUpdateReq;
import com.coffee.admin.api.platform.result.PlatformResult;
import com.coffee.admin.api.supplier.query.SupplierQuery;
import com.coffee.admin.api.supplier.rep.SupplierDetailRep;
import com.coffee.admin.api.supplier.rep.SupplierListRep;
import com.coffee.admin.api.supplier.rep.SupplierOperateRes;
import com.coffee.admin.api.supplier.req.*;
import com.coffee.admin.api.supplier.result.SupplierResult;
import com.coffee.core.entity.Page;
import com.coffee.core.entity.PagerInfo;
import com.coffee.core.exception.BusinessException;

import java.util.List;
import java.util.Map;
import java.util.Set;


public interface SupplierService {

    Page<SupplierListRep> getPager(SupplierListReq req, PagerInfo pr);

    Integer count(SupplierQuery param);

    SupplierResult getDetail(Integer id);

    SupplierDetailRep platformGetDetail(Integer id);

    List<SupplierResult> getList(SupplierQuery param, PagerInfo pr);

    List<SupplierResult> getList(SupplierQuery param);

    List<SupplierResult> getList();

    void delete(Integer id);

    void add(SupplierResult result) throws BusinessException;

    Map<Integer, SupplierResult> getItemMap(Set<Integer> idSet);

    Map<Integer, SupplierResult> getItemMap();

    void updateIsEnable(SupplierUpdateIsEnableReq req) throws BusinessException;

    void updateMobile(SupplierUpdateMobileReq req) throws BusinessException;

    void updatePassword(SupplierUpdatePasswordReq req) throws BusinessException;


    void updateBuyPermission(SupplierUpdateBuyPermissionReq req) throws BusinessException;

    Page<SupplierOperateRes> findMerchantOperatorListByPage(SupplierAccountListReq params, PagerInfo pagerInfo) throws BusinessException;

    SupplierOperateRes findMerchantOperatorDetail(SupplierAccountListReq params);

    SupplierResult getSupplierResult(SupplierQuery result) throws BusinessException;

    void insertSupplierOperate(SupplierAccountAddReq params) throws BusinessException;

    void updateSupplierOperate(SupplierAccountUpdateReq params) throws BusinessException;

    void updateRemark(SupplierAccountUpdateReq params) throws BusinessException;

}